import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Item {
    id: parameterLocationBack
    width: 1820
    height: 910

    // Rectangle{
    //     anchors.fill: parent
    //     color: "blue"

    //     Text{
    //         anchors.centerIn: parent
    //         font.pixelSize: 50
    //         font.bold: true
    //         color: "white"
    //         text: qsTr("位置参数")
    //     }
    // }


    property string currentRowColor_light: "white"
    property string currentRowColor_deep: "lightgray"

    Row{
        anchors.top: parameterLocationBack.top
        anchors.left: parameterLocationBack.left
        anchors.leftMargin: 400
        spacing: 1

        Repeater{
            model: 2

            Rectangle{
                width: 710
                height: 40
                color: "#333333"

                Text{
                    anchors.centerIn: parent
                    font.pixelSize: 15
                    color: "white"
                    text: index === 0 ? qsTr("参  数") :
                                        qsTr("描  述")


                }
            }
        }
    }

    Rectangle{
        anchors.top: parameterLocationBack.top
        anchors.topMargin: 40
        anchors.left: parameterLocationBack.left
        width: 1820
        height: 870
        color: "transparent"
        clip: true

        Rectangle{
            anchors.top: parent.top
            anchors.left: parent.left
            width: 400
            height: 870
            color: "#333333"
        }

        Rectangle{
            anchors.top: parent.top
            anchors.left: parent.left
            width: 1420
            height: 870
            color: "transparent"
        }

        Flickable {
            id: flick
            anchors.fill: parent
            flickableDirection: Flickable.VerticalFlick // 关闭水平滚动（内容宽度与容器一致）
            boundsBehavior: Flickable.StopAtBounds // 关键：滚动到边界后停止，无弹性
            contentWidth: parent.width  // 宽度固定为容器宽 // 内容区域（与之前的Column一致）

            Column {
                id: contentColumn
                width: flick.width
                spacing: 1

                Row {
                    width: parent.width
                    height: 40
                    spacing: 1

                    Rectangle{
                        width: 400
                        height: 40
                        border.width: 1
                        color: "#333333"
                        // 数据字段（与标题对应）
                        Text {
                            font.pixelSize: 20
                            horizontalAlignment: Text.AlignCenter
                            verticalAlignment: Text.AlignVCenter
                            anchors.centerIn: parent
                            color: "white"
                            text: qsTr("45度模式右角码Y安全加工深度mm")
                        }
                    }

                    Rectangle{
                        width: 710
                        height: 40
                        border.width: 1
                        color: currentRowColor_light

                        A_Input{
                            inputWidth: 710
                            onEditingFinished: function(finalValue) {
                                console.log(finalValue)
                            }
                        }

                    }
                    Rectangle{
                        width: 708
                        height: 40
                        border.width: 1
                        color: currentRowColor_light

                        Text{
                            anchors.centerIn: parent
                            font.pixelSize: 20
                            text: qsTr("测试用描述内容，仅用于展示")
                        }

                    }


                }

            }
        }

    }



}
